﻿#include "list.hpp"
#include <iostream>

using namespace mycontainer;

int main()
{
	List<int> list;
	list.push_back(1);
	std::cout << list.size() << std::endl; // 输出链表大小
	list.push_back(2);
	std::cout << list.size() << std::endl; // 输出链表大小
	list.push_back(3);
	std::cout << list.size() << std::endl; // 输出链表大小
	for (List<int>::Iterator it = list.begin(); it != list.end(); ++it)
	{
		std::cout << *it << " ";
	}
	std::cout << std::endl;
	list.pop_front();
	std::cout << list.size() << std::endl; // 输出链表大小
	list.pop_front();
	std::cout << list.size() << std::endl; // 输出链表大小
	list.pop_front();
	std::cout << list.size() << std::endl; // 输出链表大小
	list.pop_front();
	std::cout << list.size() << std::endl; // 输出链表大小
	for (List<int>::Iterator it = list.begin(); it != list.end(); ++it)
	{
		std::cout << *it << " ";
	}
	std::cout << std::endl;
	return 0;
}